package com.lu.pojo;

public class Page {
    private int total;
    private int count;
    private int pages;
    private int currentPage;

    public Page() {
    }

    public Page(int total, int count) {
        this.total = total;
        this.count = count;
        this.pages = total / count + (total % count == 0 ? 0 : 1);
        this.currentPage = 1; // 默认是第一页
    }


    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }
}
